﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:converter="clr-namespace:Rio.Manager.Application.Converters"
                    xmlns:behaviors="clr-namespace:Rio.Manager.Application.Behaviors"
                    xmlns:validation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    mc:Ignorable="d">

    
    <DataTemplate x:Key="AdministrationMenuDataTemplate">
        
        <Grid>
            <StackPanel Orientation="Horizontal"
                        d:LayoutOverrides="Height">
                <Image Margin="0,0,5,0"
                       Source="/Rio.Manager.Application;component/Assets/Images/bullet.png"
                       Width="16"
                       Height="16" />
                <TextBlock Text="{Binding Value, Mode=OneWay}"
                           FontSize="13.333"
                           VerticalAlignment="Center">
                    <i:Interaction.Behaviors>
                        <behaviors:UnderlineTextBlock />
                    </i:Interaction.Behaviors>
                </TextBlock>
            </StackPanel>
        </Grid>
    </DataTemplate>

    <Style x:Key="AdministrationMenuItemStyle"
           TargetType="ListBoxItem">
        <Setter Property="Padding"
                Value="3" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="TabNavigation"
                Value="Local" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To=".35"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="fillColor" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To=".55"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="contentPresenter" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To=".75"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="fillColor2" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="FocusVisualElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="fillColor"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   RadiusY="1"
                                   RadiusX="1" />
                        <Rectangle x:Name="fillColor2"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   RadiusY="1"
                                   RadiusX="1" />
                        <ContentPresenter x:Name="contentPresenter"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          Content="{TemplateBinding Content}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}" />
                        <Rectangle x:Name="FocusVisualElement"
                                   RadiusY="1"
                                   RadiusX="1"
                                   StrokeThickness="1"
                                   Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>